#include<iostream>
using namespace std;
const int N=100000;
int arr[N];
int z[N];
int n,i,h;
void gp(int arr[],int l,int r)
{
    if(l>=r)return;
    int mid=l + r>>1;
    gp(arr,l,mid),gp(arr,mid+1,r);
    int j=l,k=mid+1;
    i=0;
    while(j<=mid&&k<=r)
    if(arr[j]<arr[k])z[i++]=arr[j++];
    else z[i++]=arr[k++];
    while(j<=mid)z[i++]=arr[j++];
    while(k<=r)z[i++]=arr[k++];
    for(i=l,h=0;i<=r;i++,h++)
    arr[i]=z[h];
}
int main()
{
    cin>>n;
    for(i=0;i<n;i++)
    cin>>arr[i];
    gp(arr,0,n-1);
    for(i=0;i<n;i++)
    cout<<arr[i]<<" ";
    return 0;
}